import { createSlice } from "@reduxjs/toolkit"

const CitySlice = createSlice({
  name: "CitySlice",
  initialState: {
    start:'北京',
    end:'三亚'
  },
  reducers: {
    setCity(state,{payload:{type,city}}){
        state[type] = city;
    }
  }
})

export const { setCity } = CitySlice.actions

export default CitySlice.reducer